/*
 * 
 */
package org.mech.sefer.event.register;

import java.util.Iterator;

import org.mech.sefer.event.Handler;
import org.mech.sefer.event.register.HandlerRegistrationInfo.Order;

/**
 * <p>
 * The HandlerRegistry is registry container for handlers
 * </p>
 * <p>
 * Date: 24.4.2012 8:44:16
 * </p>
 *
 * @author martin.krajc
 */
public interface HandlerRegistry {

	/**
	 * Register handler
	 *
	 * @param handler the handler to register
	 * @param order the desired order of handler
	 */
	void register(Handler handler, Order order);
	
	/**
	 * Unregister handler. It usually means removing handler from registry
	 *
	 * @param handler the handler
	 */
	void unregister(Handler handler);
	
	/**
	 * Handlers in registry
	 *
	 * @return the iterator
	 */
	Iterator<Handler> handlers();
	
	
}
